home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / TURBO PASCAL 1.5 for WIN / DOC.PAK / MANUAL.TPW next >
Encoding:
Text File  |  1992-06-08  |  27.9 KB  |  890 lines

  1. Additions and corrections to Turbo Pascal for Windows manuals:
  2.  
  3.  
  4. ==============
  5.  User's Guide
  6. ==============
  7.  
  8.   The IDE now has a SpeedBar. Click an icon to perform common IDE
  9.   operations, such as File|Open or Compile|Make. Choose Help|Contents
  10.   and choose SpeedBar to learn about using the SpeedBar.
  11.  
  12.  
  13. Chapter 6, The IDE reference
  14. ============================
  15.  
  16.   There is a new Editor Option in the Options|Preferences dialog box:
  17.   Syntax Highlighting. When Syntax Highlighting is checked, the options
  18.   set in the Options|Highlight dialog box are enabled. This is the
  19.   default setting. To turn syntax highlighting off, uncheck the Syntax
  20.   Highlighting option. See the Help system for information about using
  21.   syntax highlighting; choose Help|Contents, and under Editor Options,
  22.   choose Syntax Highlighting.
  23.  
  24.   There is a new menu command on the Options menu: Highlight. Choosing
  25.   it brings up the Highlighting dialog box. Choose Help|Contents, and
  26.   under Editor Options, choose Syntax Highlighting to learn how to use
  27.   the syntax highlighting options.
  28.  
  29.   BorlandTE is the default font in the Font list box in the
  30.   Options|Preferences dialog box. You must use this font to see the
  31.   attribute settings (bold, italics, or underline) if you've selected them
  32.   in the Options|Highlighting dialog box. You won't be able to use the
  33.   BorlandTE font in other Windows products.
  34.  
  35.   On the Window menu, the Cascade command now appears before the Tile
  36.   command. On pages 161 and 162, the shortcut command for Cascade should
  37.   be Shift+F5, not Shift+F4, and the shortcut command for Tile should be
  38.   Shift+F4, not Shift+F5.
  39.  
  40.   On the Help menu, the command described as Index is now called Contents.
  41.  
  42.   Glossary is no longer an option on the Help menu.
  43.  
  44.  
  45. Chapter 4, Object-oriented programming
  46. ======================================
  47.  
  48.   In the code example on page 79, there should be a semicolon after
  49.   MyDataRec; not a comma.
  50.  
  51.   In the code example in the middle of page 83, the Init procedure
  52.   should look like this:
  53.  
  54.     Init('Allison Karlon', 'Fork lift operator', 12.95, 62);
  55.  
  56.   In the code example at the bottom of page 84, the third line from the
  57.   bottom should look like this:
  58.  
  59.     TEmployee.Init(AName, ATitle, ARate);
  60.  
  61.  
  62. ====================
  63.  Programmer's Guide
  64. ====================
  65.  
  66.  
  67. Chapter 17, Objects
  68. ===================
  69.  
  70.   In the TCircle VMT diagram on page 208, @TCircle.Done and @TCircle.MoveTo
  71.   should be @TPoint.Done and @TPoint.MoveTo respectively.
  72.  
  73.  
  74. Chapter 21, Compiler directives
  75. ===============================
  76.  
  77.   On page 257, add the following description:
  78.  
  79.     The $R directive for including resource files in an application can
  80.     only be used on resource files of 64K or less. To attach larger resource
  81.     files, such as large bitmaps, you need to use the Resource Compiler.
  82.     For example, to attach the large resource file FOOBAR.RES to the
  83.     application FOOBAR.EXE, pull down the Windows Program Manager's File|Run
  84.     menu, and in the dialog box, type the command line
  85.  
  86.       RC FOOBAR.RES
  87.  
  88.     This will attach FOOBAR.RES to FOOBAR.EXE.
  89.  
  90.     Use of the Resource Compiler is described in greater detail in Chapter
  91.     18 of the Windows Programming Guide.
  92.  
  93.   On page 259, add the following change:
  94.  
  95.     The standard conditional symbol VER15 is always defined in Turbo
  96.     Pascal for Windows version 1.5.  The symbol VER10 is undefined in
  97.     this version.
  98.  
  99.  
  100. Chapter 24, Library reference
  101. =============================
  102.  
  103.   The example programs for the following standard procedures and functions
  104.   should include the following uses clause
  105.  
  106.     uses WinCrt;
  107.  
  108.   in order to run correctly:
  109.  
  110.     Append, Assign, BlockRead, ChDir, Close, DiskFree, DiskSize, Eof, Eoln,
  111.     Erase, FileSize, FillChar, FindFirst, GetFAttr, IOResult, Length,
  112.     MemAvail, MkDir, ParamCount, ParamStr, Ptr, Reset, Rewrite, RmDir,
  113.     SetFAttr, SetTextBuf, Val.
  114.  
  115.  
  116. Appendix A, Error messages
  117. ==========================
  118.  
  119.   Run-time errors 104 and 105, "File not open for input" and "File not open
  120.   for output," respectively, will occur in programs that execute Readln or
  121.   Writeln without using the WinCrt unit. Standard input and output files are
  122.   not defined for Windows applications unless WinCrt appears in the uses
  123.   clause.
  124.  
  125.  
  126. ===========================
  127.  Windows Programming Guide
  128. ===========================
  129.  
  130.  
  131. Chapter 3, Filling in the window
  132. ================================
  133.  
  134.   On page 36, the text that follows the example should read as follows:
  135.  
  136.     The call to WVSPrintF does the type conversion and formatting.
  137.  
  138.  
  139. Chapter 6, Popping up windows
  140. =============================
  141.  
  142.   On page 73, the assignment to EC1 is missing a parameter and
  143.   should read as follows:
  144.  
  145.     EC1 := New(PEdit, Init(@Self, id_EC1, '', 20, 180, 260, 90, 0, True));
  146.  
  147.  
  148. Chapter 12, Control objects
  149. ===========================
  150.  
  151. Controls, messages, and parent windows
  152. --------------------------------------
  153.  
  154.   On page 159, the first paragraph, which describes how to keep notification
  155.   messages from being passed to the parent window, is no longer valid. The
  156.   process is actually much simpler. Instead of setting Msg.Result to 1 to
  157.   stop the routing of the message, your object can simply handle the message.
  158.   If it does not explicitly pass the message along to its parent, the parent
  159.   window will not receive the notification.
  160.  
  161.   To pass the message to the parent window, simply call DefNotificationProc,
  162.   which takes care of the routing to the parent window.
  163.  
  164.   Similarly, on page 176, the second paragraph describes notification messages
  165.   for scroll bars. As with the general case just described, the scroll bar's
  166.   parent window will not be notified by default. If you do want the parent
  167.   window to process the message, simply call DefNotificationProc.
  168.  
  169.   The same sort of setup applies to the handling of command messages. If you
  170.   want a parent window to process a command message after your object has
  171.   done some processing, you call DefCommandProc. Like notification messages,
  172.   command messages will not be routed to the parent window by default.
  173.  
  174.  
  175. Controls and the wm_Paint message
  176. ---------------------------------
  177.  
  178.   Most ObjectWindows objects respond to wm_Paint messages by calling their
  179.   Paint methods. Controls, however, are painted somewhat differently. In
  180.   most cases, you won't need to change the appearance of a control. If you
  181.   want to change the color of a particular control or type of control, you
  182.   can have your dialog object respond to wm_CtlColor messages.
  183.  
  184.   If you want to alter the appearance of a control, you have a couple of
  185.   options. Many of the controls can be created with an owner-draw style,
  186.   meaning that Windows sends an extra message, wm_DrawItem, to the parent
  187.   window, which can then draw the appropriate control. If owner-drawing is
  188.   not enough, the best option is probably to define a whole new type of
  189.   control, which draws itself as you want it.
  190.  
  191.   You can also override the WMPaint message-response method, causing it to
  192.   paint the control differently, but this is the least desirable option.
  193.  
  194.  
  195. =========================
  196.  Windows Reference Guide
  197. =========================
  198.  
  199. Chapter 2, Windows function reference
  200. =====================================
  201.  
  202. AllocSelector
  203. -------------
  204.  
  205.   In addition to the text in the manual:
  206.  
  207.   Use of AllocSelector and related functions is not normal Windows
  208.   programming practice. These functions should be avoided if possible.
  209.  
  210.  
  211. ChangeSelector
  212. --------------
  213.  
  214.   Declaration:
  215.     function ChangeSelector(DestSelector, SourceSelector: Word): Word;
  216.  
  217.   Changes the attributes of a selector from code to data or vice
  218.   versa. The value of the selector is not affected. Note that this is
  219.   not normally done, and should only be done if absolutely necessary.
  220.   The converted selector should be used immediately, as there is no way
  221.   to keep the source and destination selectors synchronized.
  222.  
  223.   Parameters:
  224.     DestSelector: The selector that receives the converted selector.
  225.                   Must have been previously allocated with AllocSelector
  226.     SourceSelector: The selector to be converted.
  227.  
  228.   Returns:
  229.     The converted selector, or zero if the conversion failed.
  230.  
  231.  
  232. DefineHandleTable
  233. -----------------
  234.  
  235.   Declaration:
  236.     function DefineHandleTable(Offset: Word): Bool;
  237.  
  238.   Creates a private handle table in the default data segment. The table
  239.   holds the addresses of locked global memory objects, as returned by
  240.   GlobalLock. Windows updates these addresses when running in real mode,
  241.   if the memory objects are moved. Addresses are not updated in protected
  242.   modes (standard and 386-enhanced).
  243.  
  244.   The handle table consists of two Word-type values followed by an array of
  245.   addresses. The first word is the number of entries in the table, which
  246.   must be initialized before the call to DefineHandleTable. The second
  247.   is the number of entries to set to zero when Windows updates its list of
  248.   least-recently-used memory. Either word may be changed at any time. The
  249.   addresses in the rest of the table are returned by GlobalLock.
  250.  
  251.   Parameters:
  252.     Offset: The offset of the table from the beginning of the data
  253.             segment. A value of zero indicates that Windows should no
  254.             longer update the table.
  255.  
  256.   Returns:
  257.     Non-zero if successful; otherwise, zero.
  258.  
  259.  
  260. DOS3Call
  261. --------
  262.  
  263.   Declaration:
  264.     procedure DOS3Call;
  265.  
  266.   Calls the DOS interrupt function 21h. DOS3Call should only be called from
  267.   assembly-language routines, as the registers for the INT 21h call must be
  268.   set up. Under Windows, DOS3Call will work somewhat faster than a direct
  269.   call to the software interrupt.
  270.  
  271.  
  272. FreeSelector
  273. ------------
  274.  
  275.   Declaration:
  276.     function FreeSelector(Selector: Word): Word;
  277.  
  278.   Frees and invalidates a selector allocated by AllocSelector,
  279.   AllocCStoDSAlias, or AllocDStoCSAlias.
  280.  
  281.   Parameters:
  282.     Selector: The selector to free
  283.  
  284.   Returns:
  285.     Zero if successful; otherwise, Selector.
  286.  
  287.  
  288. GetBitmapDimension
  289. ------------------
  290.  
  291.   Returns:
  292.     If the dimensions have not been set (using SetBitmapDimension), the
  293.     return value is zero.
  294.  
  295.  
  296. GetObject
  297. ---------
  298.  
  299.   Parameters:
  300.     Count is the number of bytes to copy into ObjectPtr.
  301.  
  302.  
  303. GetPriorityClipboard
  304. --------------------
  305.  
  306.   Returns:
  307.     In addition to the values described in the manual, returns 0 if there
  308.     is nothing in the Clipboard.
  309.  
  310.  
  311. GetProfileInt
  312. -------------
  313.  
  314.   The function returns a Word-type value, not Integer.
  315.  
  316.  
  317. GetWindowsDirectory
  318. -------------------
  319.  
  320.   There is an error in the entry for GetWindowsDirectory. It is not a
  321.   procedure, but rather a function returning a Word-type value.
  322.  
  323.   Declaration:
  324.     function GetWindowsDirectory(Buffer: PChar; Size: Word): Word;
  325.  
  326.   Returns:
  327.     The length of the string copied into Buffer.
  328.  
  329.  
  330. GlobalDiscard
  331. -------------
  332.  
  333.   Declaration:
  334.     function GlobalDiscard(Mem: THandle): THandle;
  335.  
  336.   Discards the specified global memory block if the block is discardable
  337.   and unlocked.
  338.  
  339.   Parameters:
  340.     Mem: The handle of the global memory block to discard
  341.  
  342.   Returns:
  343.     The handle of the block if successfully discarded, otherwise zero.
  344.  
  345.  
  346. GlobalDosAlloc
  347. --------------
  348.  
  349.   Declaration:
  350.     function GlobalDosAlloc(Bytes: Longint): Longint;
  351.  
  352.   Allocates global memory in the first megabyte of linear address space
  353.   that can be accessed by DOS. Use of this function should be avoided if
  354.   possible, as low memory is a scarce system resource.
  355.  
  356.   Parameters:
  357.     Bytes: The number of bytes to allocate
  358.  
  359.   Returns:
  360.     Zero if memory could not be allocated. Otherwise, the value is a
  361.     paragraph-segment value in the high-order word and a selector in the
  362.     low-order word. In real mode, the paragraph-segment value can be used
  363.     to access the allocated memory. In protected mode, the selector should
  364.     be used.
  365.  
  366.  
  367. GlobalDosFree
  368. -------------
  369.  
  370.   Declaration:
  371.     function GlobalDosFree(Selector: Word): Word;
  372.  
  373.   Frees a block of memory allocated by GlobalDosAlloc.
  374.  
  375.   Parameters:
  376.     Selector: The selector of the memory to free
  377.  
  378.   Returns:
  379.     Zero if successful; otherwise Selector.
  380.  
  381.  
  382. HiByte
  383. ------
  384.  
  385.   Declaration:
  386.     function HiByte(A: Word): Byte;
  387.     inline(
  388.       $5A/       { POP AX    }
  389.       $8A/$C4/   { MOV AL,AH }
  390.       $32/$E4);  { XOR AH,AH }
  391.  
  392.   Extracts the high-order byte from a 16-bit integer value.
  393.  
  394.   Parameters:
  395.     A: The 16-bit integer
  396.  
  397.   Returns:
  398.     The high-order byte
  399.  
  400.  
  401. LoByte
  402. ------
  403.   Declaration:
  404.     function LoByte(A: Word): Byte;
  405.     inline(
  406.       $5A/       { POP AX    }
  407.       $32/$E4);  { XOR AH,AH }
  408.  
  409.   Extracts the low-order byte from a 16-bit integer value.
  410.  
  411.   Parameters:
  412.     A: The 16-bit integer
  413.  
  414.   Returns:
  415.     The low-order byte
  416.  
  417.  
  418. LocalDiscard
  419. ------------
  420.  
  421.   Declaration:
  422.     function LocalDiscard(Mem: THandle): THandle;
  423.  
  424.   Discards the specified local memory block, leaving its handle valid,
  425.   meaning that the handle may be reused by calling LocalReAlloc.
  426.  
  427.   Parameters:
  428.     Mem: The handle of the local memory block
  429.  
  430.   Returns:
  431.     Zero if successful; otherwise Mem.
  432.  
  433.  
  434. NetBIOSCall
  435. -----------
  436.  
  437.   Declaration:
  438.     procedure NetBIOSCall;
  439.  
  440.   Calls the NETBIOS interrupt 5Ch. This call should be used instead of a
  441.   direct call to the 5Ch software interrupt for future compatibility.
  442.  
  443.   NetBIOSCall should only be called from within assembly-language routines,
  444.   as the CPU registers must be set for the interrupt call.
  445.  
  446.  
  447. SetSysColors
  448. ------------
  449.  
  450.   The declaration for SetSysColors has changed slightly, with the last two
  451.   parameters now being untyped var parameters:
  452.  
  453.     procedure SetSysColors(Changes: Integer; var SysColor; var ColorValues);
  454.  
  455.   The descriptions of the parameters in the manual are, however, correct.
  456.  
  457.  
  458. WVSPrintF
  459. ---------
  460.  
  461.   The manual excluded the descriptions of the formatting parameters used
  462.   by wvsprintf's Format parameter.  The formatting specifiers are as
  463.   follows:
  464.  
  465.   The general format is % [-] [#] [0] [xxx] [.yyy] z,
  466.  
  467.   where % indicates that this is a format specifier, and z is the type of
  468.   string to output.  The optional fields dictate the formatting.
  469.  
  470.      - if present, left-justify the output, otherwise it's right-justified
  471.      # if present, adds a 0x prefix to hex numbers
  472.      0 if present, makes the pad characters zeros; default is spaces
  473.    xxx is the width of the field, a positive integer; default is all chars
  474.    yyy is the precision (decimal places) of the field; default is 1
  475.  
  476.   The type is specified by one or two characters, as follows:
  477.  
  478.      s   String; the parameter is a PChar
  479.      c   Character
  480.      d   Integer (also i)
  481.      ld  Longint (also li)
  482.      u   Word
  483.      lu  Long Word (as if there were one)
  484.      x   Hexadecimal word (X makes uppercase)
  485.      lx  Hex longint (lX makes uppercase)
  486.  
  487.  
  488. Chapter 4, Windows type reference
  489. =================================
  490.  
  491. Dialog templates
  492. ----------------
  493.  
  494. The Windows API functions CreateDialogIndirect, CreateDialogIndirectParam,
  495. DialogBoxIndirect, and DialogBoxIndirectParam take a pointer to a Windows
  496. data structure called DLGTEMPLATE or TDlgTemplate. This "structure" cannot,
  497. in fact, be defined as a Pascal record, or even as a C structure, because it
  498. has null-terminated string data embedded within it. Dialog templates, then,
  499. should be thought of as blocks of data to be read in a stream, rather than
  500. as data structures per se.
  501.  
  502. A dialog template consists of three parts, only the first of which is
  503. required. First comes the dialog template header, then optional font
  504. information for the dialog, then template information for each of the
  505. items in the dialog box.
  506.  
  507. All dialog templates begin with a dialog template header. The first six
  508. items in it are rigidly defined and named such that they might appear as
  509. a record like this:
  510.  
  511.   type
  512.     DialogTemplateHeader = record
  513.       dtStyle: Longint;
  514.       dtItemCount: Byte;
  515.       dtX, dtY: Integer;
  516.       dtCX, dtCY: Integer;
  517.     end;
  518.  
  519. In essence, the block of dialog template information must contain first a
  520. long integer value defining the style of the dialog box. This value can be
  521. one of, or any combination of, the ds_ Dialog style constants. Next is a
  522. byte that gives the number of items in the dialog box, dtItemCount.
  523.  
  524. Following those numbers are dtX and dtY, the x- and y-coordinates,
  525. respectively, of the upper-left corner of the dialog box. By default, these
  526. coordinates are relative to the origin of the parent window's client area,
  527. but if the dialog's style includes ds_AbsAlign, the coordinates are
  528. relative to the origin of the screen.
  529.  
  530. dtCX and dtCY are, respectively, the width and height of the dialog box.
  531.  
  532. A quick word is in order regarding the units used to define the coordinates
  533. and size of a dialog box. Dialog units are derived from the size of the
  534. current system font. The GetDialogBaseUnits API function returns the base
  535. unit size in pixels. Dialog coordinates and size are then expressed in
  536. fractions of the base unit. Horizontal components (dtX and dtCX) are
  537. expressed in units of 1/4 of the base width unit. Vertical components
  538. (dtY and dtCY) are in units of 1/8 the base height unit.
  539.  
  540. Following the coordinates and size of the dialog box are three null-terminated
  541. strings, called dtMenuName, dtClassName, and dtCaptionText, respectively.
  542. These give the name of the dialog box's menu, the name of the dialog box's
  543. Windows class, and the dialog box's caption.
  544.  
  545. If dtStyle contains the ds_SetFont constant, indicating that a font other
  546. than the current system font is to be used in the dialog, the caption text
  547. string must be followed immediately by two items describing the font: a
  548. short integer number giving the point size of the typeface, then a null-
  549. terminated string giving the name of the typeface. The specified font must
  550. be available to Windows, either through the initialization file or through
  551. a call to the LoadFont API function.
  552.  
  553. Immediately after the font information (if any) come dialog item templates,
  554. one for each control in the dialog box. The number of items is determined by
  555. the dtItemCount number.
  556.  
  557. Each dialog item template consists of five integers, then a long integer, then
  558. two null-terminated strings, then a byte and (maybe) additional data. The
  559. first four integers are called dtilX, dtilY, dtilCX, and dtilCY. These define
  560. the position and size of the control, relative to the origin of the dialog
  561. box. The units for each of these are the same as the corresponding items
  562. in the dialog template header.
  563.  
  564. Next comes dtilID, an integer which gives the dialog item ID of the control.
  565.  
  566. Following the ID is dtilStyle, a long integer which holds the style of the
  567. dialog-box item.
  568.  
  569. After the style information comes a null-terminated string holding the name
  570. of the control's Windows class, which can be BUTTON, EDIT, STATIC, LISTBOX,
  571. SCROLLBAR, or COMBOBOX.
  572.  
  573. Immediately after the class name is another null-terminated string, dtilText,
  574. which holds the text for the item.
  575.  
  576. After the strings comes a byte called dtilInfo, which tells how many bytes of
  577. additional information follow. A value of zero indicates that there is no
  578. additional information, and therefore terminates the dialog item template.
  579. If dtilInfo is non-zero, the next group of bytes, called dtilData, hold
  580. information that is passed to the CreateWindow function in the CreateParams
  581. field of a TCreateStruct.
  582.  
  583.  
  584. MakePoint
  585. ---------
  586.  
  587.   Declaration:
  588.     MakePoint = TPoint;
  589.  
  590.   MakePoint is used for typecasting long integer numbers into TPoint records.
  591.  
  592.  
  593. TDlgTemplate
  594. ------------
  595.  
  596.   TDlgTemplate is not truly a type, and cannot be represented in Pascal (or
  597.   any other programming language). Windows API calls that require a
  598.   TDlgTemplate "structure" actually take a pointer to a block of information
  599.   which is defined earlier in this file under "Dialog templates."
  600.  
  601.  
  602. TMenuItemTemplate
  603. -----------------
  604.  
  605.   Declaration:
  606.     TMenuItemTemplate = record
  607.       mtOption: Word;
  608.       mtID: Word;
  609.       mtString: PChar;
  610.     end;
  611.  
  612.   The TMenuItemTemplate record holds information for a menu item.
  613.   TMenuItemTemplate records can be strung together to form a list of
  614.   menu items. Combined with a TMenuItemTemplateHeader, this list forms
  615.   a complete menu template.
  616.  
  617.   The mtOption field contains one of (or a combination of) the mf_ Menu flag
  618.   constants, such as mf_Grayed, mf_Popup, and so on. These define the type
  619.   and state of the menu item.
  620.  
  621.   The mtID field holds an ID code for the menu item. Pop-up menu items (those
  622.   that bring up another menu) do not have an mtID field.
  623.  
  624.   The mtString field holds a null-terminated string, specifying the name of
  625.   the menu item.
  626.  
  627.  
  628. TMenuItemTemplateHeader
  629. -----------------------
  630.  
  631.   Declaration:
  632.     TMenuItemTemplateHeader = record
  633.       versionNumber: Word;
  634.       offset: Word;
  635.     end;
  636.  
  637.   The TMenuItemTemplateHeader serves as the header for a menu template. A
  638.   complete menu template consists of a header and an item list. The item list
  639.   is usually a list of TMenuItemTemplate records.
  640.  
  641.   The versionNumber field holds the version number of the menu template. This
  642.   should be zero. The offset field gives the offset (in bytes) of the beginning
  643.   of the item list, relative to the header.
  644.  
  645.  
  646. Chapter 5, ObjectWindows reference
  647. ==================================
  648.  
  649. TControl object
  650. ---------------
  651.  
  652. Method deleted:
  653.  
  654.   DefWndProc
  655.     TControl no longer overrides DefWndProc. Instead, it uses the method
  656.   inherited from TWindow (i.e. TWindow.DefWndProc).
  657.  
  658.  
  659. TDialog object
  660. --------------
  661.  
  662. Methods deleted:
  663.  
  664.   Destroy
  665.     TDialog.Destroy no longer exists. TDialog uses the inherited Destroy
  666.   method from TWindowsObject.
  667.  
  668.   EnterCancel and EnterOK
  669.     These methods are no longer needed. Instead of generating a command-
  670.   based message when Enter is pressed to activate an OK or Cancel button,
  671.   ObjectWindows will generate a notification message based on the control
  672.   ID of the button "pressed," just as if it had been clicked with the mouse.
  673.  
  674.   SetName
  675.     Rather than calling SetName, the Attr.Name field should be changed
  676.   directly.
  677.  
  678. New method:
  679.  
  680. WMClose
  681.  
  682.   Declaration:
  683.     procedure WMClose(var Msg: TMessage); virtual wm_First + wm_Close;
  684.  
  685.   If the dialog box is modal, calls EndDlg(id_Cancel) to close the dialog
  686.   box. If the dialog box is modeless, it calls its WMClose method inherited
  687.   from TWindowsObject.
  688.  
  689.   See also:  TDialog.EndDlg, TWindowsObject.WMClose
  690.  
  691.  
  692. TDlgWindow object
  693. -----------------
  694.  
  695.   The class name of the dialog window's resource (as defined in the Resource
  696.   Compiler script or dialog editor) must match the class name of the
  697.   TDlgWindow object instance. If the class names do not match, the one given
  698.   in the resource template will be used.
  699.  
  700. Methods deleted:
  701.   Cancel and OK are no longer overridden by TDlgWindow. The methods inherited
  702.   from TDialog are used instead.
  703.  
  704.  
  705. TEdit object
  706. ------------
  707.  
  708. New method:
  709.  
  710. Search
  711.  
  712.   Declaration:
  713.     function Search(StartPos: Integer; AText: PChar;
  714.       CaseSensitive: Boolean): Integer;
  715.  
  716.   Search looks through the edit control's text, starting with the character
  717.   at StartPos, until it finds a match for AText. If the text is found, the
  718.   matching text will be selected, and Search returns the position of the start
  719.   of the matched text. If AText is not found in the edit control's text,
  720.   Search returns -1.
  721.  
  722.   Passing -1 in StartPos causes the search to begin at the current position.
  723.  
  724.  
  725. TScroller object
  726. ----------------
  727.  
  728. New field:
  729.  
  730. AutoOrg
  731.  
  732.   Declaration:
  733.     AutoOrg: Boolean;
  734.  
  735.   When AutoOrg is True, the origin of the display context (DC)
  736.   passed to the parent window's Paint method is automatically
  737.   adjusted so all calls using that DC reflect the position of the
  738.   scroll bars. This frees you from having to manually adjust the
  739.   coordinates used when painting the window's client area. When
  740.   AutoOrg is False, you must do this mapping manually.
  741.  
  742.   If the scrollable range can exceed 32767, AutoOrg must be set
  743.   to False.
  744.  
  745.   Note that when AutoOrg is True, child windows are automatically
  746.   repositioned based on the scroll bar positions. When AutoOrg is
  747.   False, child windows are not supported.
  748.  
  749.  
  750. TWindow object
  751. --------------
  752.  
  753. Methods deleted:
  754.  
  755.     Destroy and WMDestroy are no longer overridden by TWindow.
  756.   TWindow objects use the methods inherited from TWindowsObject.
  757.  
  758. New method:
  759.  
  760. WMMove
  761.  
  762.   Declaration:
  763.     procedure WMMove(var Msg: TMsg); virtual wm_First + wm_Move;
  764.  
  765.   Updates Attr.X and Attr.Y when the wm_Move message is received, unless the
  766.   window is iconic or zoomed, in which case the message is ignored.
  767.  
  768.  
  769. TWindowsObject object
  770. ---------------------
  771.  
  772. Method deleted:
  773.  
  774.   DefScrollProc
  775.     Scrolling messages are now handled by DefWndProc instead of DefScrollProc.
  776.  
  777. New methods:
  778.  
  779. CloseWindow
  780.  
  781.   Declaration:
  782.     procedure CloseWindow;
  783.  
  784.   Calls CanClose to see if the window is ready to close. If CanClose returns
  785.   True, disposes the window object and destroys the associated window element.
  786.  
  787. CMExit
  788.  
  789.   Declaration:
  790.     procedure CMExit(var Msg: TMessage); virtual cm_First + cm_Exit;
  791.  
  792.   Responds to a cm_Exit command message by causing the application to
  793.   terminate, if a call to CanClose returns True. The cm_Exit message will
  794.   normally only be sent to the application's main window.
  795.  
  796. CreateChildren
  797.  
  798.   Declaration:
  799.     function CreateChildren: Boolean;
  800.  
  801.   Calls Create for all child windows. Called automatically by SetupWindow, so
  802.   you don't normally need to call it directly. CreateChildren need only be
  803.   called after GetChildren, to create visual elements for child window objects
  804.   loaded from a stream.
  805.  
  806.   See also:  TWindowsObject.GetChildren
  807.  
  808. GetChildren
  809.  
  810.   Declaration:
  811.     procedure GetChildren(var S: TStream);
  812.  
  813.   Reads child windows from the given stream, and puts them in the window's
  814.   child window list. GetChildren assumes that ChildList is initially empty;
  815.   pointers to children added prior to calling GetChildren will be lost.
  816.  
  817.   See also:  TWindowsObject.PutChildren
  818.  
  819. PutChildren
  820.  
  821.   Declaration:
  822.     procedure PutChildren(var S: TStream);
  823.  
  824.   Iterates through the window's child window list, writing each of the child
  825.   windows to the given stream. PutChildren is called automatically by
  826.   TWindowsObject.Store, but it can also be called directly in cases where you
  827.   want to save the contents of a window without storing the window itself.
  828.  
  829.   See also:  TWindowsObject.GetChildren
  830.  
  831.  
  832. WMQueryEndSession
  833.  
  834.   Declaration:
  835.     procedure WMQueryEndSession(var Msg: TMsg);
  836.       virtual wm_First + wm_QueryEndSession
  837.  
  838.   If the window is the application's main window, it responds to the
  839.   wm_QueryEndSession message by calling Application^.CanClose, and if that
  840.   returns True, sets Msg.Result to 1; otherwise, it sets Msg.Result to 0.
  841.  
  842.   See also:  wm_QueryEndSession message
  843.  
  844.  
  845. Changed example:
  846.  
  847. ForEach
  848.  
  849.   The code example at the end of the description of ForEach contains an
  850.   error.  The line
  851.  
  852.     ForEach(@CheckAllBoxes);
  853.  
  854.   should read
  855.  
  856.     ForEach(@CheckTheBox);
  857.  
  858.  
  859. Chapter 6, Global reference
  860. ===========================
  861.  
  862. MemAlloc function             (WObjects unit)
  863. ---------------------------------------------
  864.  
  865.   Declaration:
  866.     function MemAlloc(Size: Word): Pointer;
  867.  
  868.   Function:
  869.     Allocates Size bytes of memory on the heap and returns a pointer to the
  870.     block. If a block of the requested size cannot be allocated, a value of
  871.     nil is returned. As opposed to the New and GetMem standard procedures,
  872.     MemAlloc will not allow the allocation to dip into the safety pool. A
  873.     block allocated by MemAlloc can be disposed using the FreeMem standard
  874.     procedure.
  875.  
  876.   Note:
  877.     MemAlloc was inadvertently referred to as AllocMem in a couple of
  878.     places in the documentation.
  879.  
  880.  
  881. ===============
  882.  Help Compiler
  883. ===============
  884.  
  885.   The most up-to-date source code for the HELPEX example is
  886.   contained on disk in the \TPW\DOCDEMOS\HELPEX directory. Note
  887.   that OWLHELP.PAS, an ObjectWindows version of HELPEX, is also
  888.   provided.
  889.  
  890.